package util;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: WangYongGan
 * @Date: 2021/11/2 0:41
 * @Description:
 */
public class JsonUtil {
    public static void main(String[] args) {
        List<String>list=new ArrayList<>();
        list.add("wang");
        list.add("zhang");
        String string = JSONObject.toJSONString(list);
        Object o = JSONObject.toJSON(list);
        System.out.println(string);
        System.out.println(list);
    }
}
